package com.xiaoq.distribution.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.xiaoq.distribution.entity.DistriTicketEntity;
import com.xiaoq.distribution.repository.IDistriTicketRepository;
import com.xiaoq.distribution.service.IDistriTicketService;
import com.xiaoq.vo.PagingVo;

@Service
public class DistriTicketServiceImpl implements IDistriTicketService{
	
	@Autowired
	private IDistriTicketRepository distriTicketRep;

	@Override
	public boolean save(DistriTicketEntity distriTicket) {
		return distriTicketRep.save(distriTicket);
	}

	@Override
	public DistriTicketEntity findById(String id) {
		return distriTicketRep.findById(id);
	}

	@Override
	public List<DistriTicketEntity> findDistriTickets(String agreementId, PagingVo pvo) {
		return distriTicketRep.findDistriTickets(agreementId, pvo);
	}

	@Override
	public List<DistriTicketEntity> findDistriTicketsByStatus(String shopId, PagingVo pvo, String status) {
		return distriTicketRep.findDistriTicketsByStatus(shopId, pvo, status);
	}

	@Override
	public DistriTicketEntity getDistriTicket(String distribId, String ticketId) {
		return distriTicketRep.getDistriTicket(distribId, ticketId);
	}


	@Override
	public List<DistriTicketEntity> getDistriTicketList(String distribId, String ticketId, String status) {
		return distriTicketRep.getDistriTicketList(distribId, ticketId, status);
	}

	@Override
	public boolean updateTicketCommitCount(String id, int plusSellTicketCount) {
		return distriTicketRep.updateTicketCommitCount(id, plusSellTicketCount);
	}
}
